home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-26 | 9.9 KB | 246 lines | [ttro/ttxt] |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Q&A #4
-
- How to Add Content to OpenDoc
-
- By the Apple Computer OpenDoc Human Interface Team
-
- As published in the May 1995 Apple Directions .
-
- Many OpenDoc demos show how easy it is to add content by dragging a document
- from the desktop into an open document. Users like the drag-and-drop feature
- better than copying and pasting because they feel more in control, and one
- of the goals for OpenDoc is for users to enjoy what they are doing.
-
- Recent discussions we've had with developers have shown, however, that we
- may have confused you into thinking that dragging and dropping is the only
- mechanism for getting new content into an OpenDoc document. So, in this
- article we'll describe all the mechanisms that are available: tool palettes,
- copy and paste, drag and drop, and the Insert command--from both the user
- and developer perspectives.
-
- By the end of this article, you'll see how OpenDoc benefits both users and
- developers by allowing users to work with all the tools and features with
- which they are familiar.
-
- Tool Palettes
-
- Many of today's applications provide palettes of tools for adding different
- kinds of content. Tool palettes are common in painting, drawing, and other
- kinds of applications. For example, take a look at the tool palette from
- Adobe Persuasion 3.0, as shown on this page. This palette contains various
- tools for creating and editing the contents of a drawing--line, rectangle,
- and oval tools. It also contains a tool for creating and editing text items.
-
-
-
-
-
-
-
-
-
- Tool palettes work well for the task of creating new content, and we
- encourage developers to continue providing such tools in OpenDoc. However,
- we recommend a change in the implementation of these tools. Instead of
- reimplementing common function in your code, your OpenDoc software should
- use part editors already present on the user's system that perform the same
- functions.
-
- For example, suppose the user is creating a slide with a hypothetical
- version of Persuasion implemented as an OpenDoc presentation part editor.
- Here's one way that the presentation part might implement the text tool: The
- user chooses the text tool and drags to select a region on the current
- slide, as shown in the screen shot "Creating a text part" below. Persuasion
- notes the size of the region selected by the user and creates a text part of
- the same size within the overall presentation document. The user can then
- easily see it and manipulate it.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Creating a text part.
-
- In the next screen shot, "Using the text part" (below), you'll see that the
- user has clicked inside that text part and typed some text. The border
- around the text part is the "active border"--it indicates that the text part
- is active, and that any keystrokes made will go into this part, which is
- controlled by a sample text part editor we've named SurfWriter. It also
- indicates that menu commands apply to the content of this part. The menu bar
- has changed from slide-specific menus to text-specific menus--and, if you
- were to open the Apple menu, you'd find that the first menu command reads
- About SurfWriter instead of About Persuasion. Finally, note that the
- Persuasion tool palette has gone away because the user is now using the text
- part editor, not the gamut of Persuasion tools.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Using a text part.
-
- The advantage to you is that you can concentrate on the distinguishing
- portion of your product, instead of providing yet another implementation of
- text editing. You also may be able to simplify your menus. For example, an
- OpenDoc implementation of Persuasion would not have a Text menu, because
- Persuasion would no longer supply the text functions (see the screen shot
- "Creating a text part"). Deleting menus from your product means that it can
- provide more features without resorting to hierarchical menus.
-
- The advantage to users is that their learning time decreases: They can learn
- how to use one editor instead of many, and they're less likely to be
- confused by conflicting features of the different implementations of
- editors. The text functions have an entire menu bar instead of being
- contained in one menu. Thus, the menu structure is simpler and individual
- menu items are easier to find than when hidden in hierarchical menus.
-
-
-
- Which Editor to Reuse
-
- Users may have installed more than one OpenDoc part editor for a particular
- kind of content--for example, the latest version and an earlier version of a
- particular text editor. Or, users may even have more than one kind of text
- editor installed, so that they can exchange files with other users more
- easily. OpenDoc allows the user to specify which editor to use for
- particular kinds of content. This is done through the Editor Preferences
- control panel. So, when your OpenDoc software calls on the features of other
- part editors--in our example, a text part editor--make sure that it checks
- the user's preferences and uses the part editor listed there.
-
- Copy and Paste
-
- Copy and Paste is another way to add content to an OpenDoc part. With
- today's monolithic applications, a user copies content from one document and
- pastes it into another, but the result from the same action in different
- contexts is often unpredictable. For example, if the user selects a group of
- spreadsheet cells and pastes them into a word processor, the result may be a
- table of those numbers, but not the formula. If the user pastes the same
- content into a drawing, they're likely to get a text item with tab-delimited
- text, but not the formulas. Only part of the content may be copied, and the
- pasted content behaves differently from the original. In contrast, when
- users copy and paste between OpenDoc documents, they'll get a "smart
- paste"--a full function copy of the original, including data, formulas, and
- the complete spreadsheet features.
-
- The basic rule is that what users copy is what they should have after they
- paste. Note, however, that this doesn't mean that every time users paste
- they create a new part, with different features, inside the destination
- document. When the pasted content belongs to the same kind as the
- destination content, the pasted content is merged rather than embedded. For
- example, if the user pastes content from a drawing into a second drawing,
- the pasted content is merged into the second drawing.
-
- Sounds easy, right? But how do you know when to have your OpenDoc software
- create a new part and when to have it merge the content into the current
- part? Suppose the user pastes content from a painting into a drawing--what
- should happen in this case? The user may perceive no difference in the kinds
- of content from a simple visual inspection, but because the content is
- different the painting is embedded into the drawing instead of merged.
-
- Your editor has to determine whether the source and destination content are
- compatible. To help your software make this determination, we have defined
- several data categories for OpenDoc software--text, painting, drawing,
- movie, spreadsheet, controls, and so on.
-
- When you develop an OpenDoc part editor, you determine which categories your
- editor supports. If the copied content and destination part are in the same
- category of data, your editor will then merge the pasted content into the
- content of the destination part. Otherwise, your editor will create a new
- part, and embed it. (This is described in more detail in the OpenDoc
- developer documentation.)
-
- Drag and Drop
-
- Drag and drop is another way to add content to an OpenDoc part. As with
- copying and pasting, dragging and dropping may either cause a new part to be
- embedded or content to be merged. However, drag and drop goes a bit further
- than today's copy and paste. When the user drags content (for example,
- spreadsheet cells) to the desktop, OpenDoc creates a new document. That
- document is of the same kind as the source of the dragged content and
- contains only the dragged content. This mechanism behaves like the System
- 7.5 clippings feature, but the document can be edited, saved, and so on.
- (Think of it as "Clippings--The Next Generation.")
-
- The Insert Command
-
- Like drag and drop, the Insert command is another way to add content to an
- OpenDoc part. The differences are that the user doesn't leave the document
- to find the content to be added, and only entire documents may be inserted.
- The Insert command allows the user to locate the source document using the
- Standard File dialog box. When the user chooses a document in the Standard
- File dialog box, the contents of that document are inserted at the insertion
- point in the active part. As with the copy and paste and the drag and drop
- operations, inserted contents may be embedded or merged.
-
- Interaction With Non-OpenDoc Documents
-
- By now you may be wondering what happens when the user copies content
- between OpenDoc and non-OpenDoc documents. OpenDoc allows content to be
- copied from non-OpenDoc to OpenDoc documents. When the content is pasted,
- dropped, or inserted, OpenDoc determines the user's preferred editor for the
- kind of content being inserted. Sometimes translation may occur, and
- occasionally there may not be an editor that supports the source kind of
- content. Nonetheless, a part of the appropriate kind and content is embedded
- so that the content is not lost. The user may later install an additional
- editor to handle this kind of content.
-
- Going the other way-that is, copying from an OpenDoc document into a
- non-OpenDoc document--OpenDoc supports the standard scrap types. However,
- embedded content or features not supported by the destination document will
- not appear in the destination document--as is the case in today's
- applications. (Recall the earlier example, in which cells from a non-OpenDoc
- spreadsheet were pasted into a drawing and appeared there as tab-delimited
- text without formulas.)
-
- Editor's note and disclaimer: The examples in this article should not be
- taken as a commitment to any specific future products by Adobe Systems,
- Inc., or Apple Computer, Inc. Thanks to Adobe for permission to use
- Persuasion in our example.
- __________________________________________________________
-
- Copyright (c) 1995 by Apple Computer, Inc. All Rights Reserved.
-